package com.zmzncs.lmtc.module.shop.dao;

import com.zmzncs.lmtc.module.shop.pojo.shop_order.ShopOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzncs.lmtc.module.shop.pojo.shop_order.ShopOrderDTO;
import com.zmzncs.lmtc.module.shop.pojo.shop_order.ShopOrderGoodsDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 商户-订单 Mapper 接口
 * </p>
 *
 * @author 高博文
 * @since 2021-05-20
 */
@Repository
public interface ShopOrderMapper extends BaseMapper<ShopOrder> {

    /**根据订单编号查询商户订单信息*/
    ShopOrderDTO getOrderByOrderCode(@Param("orderCode") String orderCode);

    /**查询待支付 商户订单信息*/
    ShopOrderDTO getWaitPayOrderByGoodsId(@Param("customerId") Long customerId , @Param("goodsId") Long goodsId);

    /**根据状态 查商户订单信息*/
    List<ShopOrderGoodsDTO> getMyOrderInfoListByStatus(Long customerId , Long status);

}
